import java.util.Scanner;

public class day230426 {
    // 剪花布条
    public static void main3(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String str1 = in.next();
            String str2 = in.next();
            int count = 0;
            while (str1.indexOf(str2) != -1) {
                count++;
                str1 = str1.substring(str1.indexOf(str2) + str2.length());
            }
            System.out.println(count);
        }
    }

    // 2  递归, indexOf
    private static int func2(String str1, String str2) {
        int index = str1.indexOf(str2);
        if (index == -1) {
            // 当前 str1 中已经找不出 str2 了
            return 0;
        }
        // 将 str1 裁剪, 然后继续递归
        return 1 + func2(str1.substring(index + str2.length()), str2);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String str1 = sc.next();
            String str2 = sc.next();
            System.out.println(func2(str1, str2));
        }
    }

    // 1
    // str1 从下标 index 开始, 是否是 str2
    private static int func(String str1, String str2, int index) {
        int i = index;
        int j = 0;
        while (i < str1.length() && j < str2.length()
                && str1.charAt(i) == str2.charAt(j)) {
            i++;
            j++;
        }
        if (j == str2.length()) {
            return 1;
        }
        return 0;
    }

    public static void main2(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String str1 = sc.next();
            String str2 = sc.next();
            int i = 0;
            int count = 0;
            while (i < str1.length()) {
                int tmp = func(str1, str2, i);
                if (tmp == 1) {
                    // 裁掉小饰条的长度
                    i += str2.length();
                    count++;
                } else {
                    i++;
                }
            }
            System.out.println(count);
        }
    }

    // 客似云来
    public static void main1(String[] args) {
        // long
        long[] arr = new long[80];
        arr[0] = 1;
        arr[1] = 1;
        for (int i = 2; i < 80; i++) {
            arr[i] = arr[i - 1] + arr[i - 2];
        }
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            long result = 0;
            for (int i = a; i <= b; i++) {
                result += arr[i - 1];
            }
            System.out.println(result);
        }
    }
}
